<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 字符串</title>
</head>
<body>
<h2>字符串</h2>
<p>字符串在引号中书写。您能够使用单引号或双引号,只要不匹配围绕字符串的引号即可：</p>

<p id="demo"></p>
<script>
  var x="Bill Gates";
  var carName='911';
  var anwer1="he is called 'Bill'";
  var anwer2='he is called "Bill"';

  document.getElementById("demo").innerHTML=x+ "<br>" +carName+ "<br>" +
          anwer1+ "<br>" +anwer2;
</script>
</body>
</html>